package com.demo.account_service.repository;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.demo.account_service.model.Account;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;


@Repository
public interface accountRepository extends BaseMapper<Account> {
    @Select("select * from accounts where ${ew.SqlSegment}")
    @Results({
            @Result(property = "account_number", column = "account_number"),
            @Result(property = "password", column = "password"),
    })
    Account selectByAccountNumber(@Param("ew") Wrapper<Account> queryWrapper);

}
